3.14.42 \(\int \frac {(b+2 c x) (d+e x)^2}{(a+b x+c x^2)^2} \, dx\)

Optimal. Leaf size=87 \[ -\frac {2 e (2 c d-b e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c \sqrt {b^2-4 a c}}-\frac {(d+e x)^2}{a+b x+c x^2}+\frac {e^2 \log \left (a+b x+c x^2\right )}{c} \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {768, 634, 618, 206, 628} \begin {gather*} -\frac {2 e (2 c d-b e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c \sqrt {b^2-4 a c}}-\frac {(d+e x)^2}{a+b x+c x^2}+\frac {e^2 \log \left (a+b x+c x^2\right )}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((b + 2*c*x)*(d + e*x)^2)/(a + b*x + c*x^2)^2,x]

[Out]

-((d + e*x)^2/(a + b*x + c*x^2)) - (2*e*(2*c*d - b*e)*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(c*Sqrt[b^2 - 4*
a*c]) + (e^2*Log[a + b*x + c*x^2])/c

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 768

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Sim
p[(g*(d + e*x)^m*(a + b*x + c*x^2)^(p + 1))/(2*c*(p + 1)), x] - Dist[(e*g*m)/(2*c*(p + 1)), Int[(d + e*x)^(m -
 1)*(a + b*x + c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && EqQ[2*c*f - b*g, 0] && LtQ[p, -1]
&& GtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {(b+2 c x) (d+e x)^2}{\left (a+b x+c x^2\right )^2} \, dx &=-\frac {(d+e x)^2}{a+b x+c x^2}+(2 e) \int \frac {d+e x}{a+b x+c x^2} \, dx\\ &=-\frac {(d+e x)^2}{a+b x+c x^2}+\frac {e^2 \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{c}+\frac {(e (2 c d-b e)) \int \frac {1}{a+b x+c x^2} \, dx}{c}\\ &=-\frac {(d+e x)^2}{a+b x+c x^2}+\frac {e^2 \log \left (a+b x+c x^2\right )}{c}-\frac {(2 e (2 c d-b e)) \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c}\\ &=-\frac {(d+e x)^2}{a+b x+c x^2}-\frac {2 e (2 c d-b e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c \sqrt {b^2-4 a c}}+\frac {e^2 \log \left (a+b x+c x^2\right )}{c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 98, normalized size = 1.13 \begin {gather*} \frac {-\frac {2 e (b e-2 c d) \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right )}{\sqrt {4 a c-b^2}}+\frac {e^2 (a+b x)-c d (d+2 e x)}{a+x (b+c x)}+e^2 \log (a+x (b+c x))}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((b + 2*c*x)*(d + e*x)^2)/(a + b*x + c*x^2)^2,x]

[Out]

((e^2*(a + b*x) - c*d*(d + 2*e*x))/(a + x*(b + c*x)) - (2*e*(-2*c*d + b*e)*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*
c]])/Sqrt[-b^2 + 4*a*c] + e^2*Log[a + x*(b + c*x)])/c

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(b+2 c x) (d+e x)^2}{\left (a+b x+c x^2\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((b + 2*c*x)*(d + e*x)^2)/(a + b*x + c*x^2)^2,x]

[Out]

IntegrateAlgebraic[((b + 2*c*x)*(d + e*x)^2)/(a + b*x + c*x^2)^2, x]

________________________________________________________________________________________

fricas [B]  time = 0.44, size = 573, normalized size = 6.59 \begin {gather*} \left [-\frac {{\left (b^{2} c - 4 \, a c^{2}\right )} d^{2} - {\left (a b^{2} - 4 \, a^{2} c\right )} e^{2} + {\left (2 \, a c d e - a b e^{2} + {\left (2 \, c^{2} d e - b c e^{2}\right )} x^{2} + {\left (2 \, b c d e - b^{2} e^{2}\right )} x\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c + \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + {\left (2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} d e - {\left (b^{3} - 4 \, a b c\right )} e^{2}\right )} x - {\left ({\left (b^{2} c - 4 \, a c^{2}\right )} e^{2} x^{2} + {\left (b^{3} - 4 \, a b c\right )} e^{2} x + {\left (a b^{2} - 4 \, a^{2} c\right )} e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{a b^{2} c - 4 \, a^{2} c^{2} + {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} x^{2} + {\left (b^{3} c - 4 \, a b c^{2}\right )} x}, -\frac {{\left (b^{2} c - 4 \, a c^{2}\right )} d^{2} - {\left (a b^{2} - 4 \, a^{2} c\right )} e^{2} + 2 \, {\left (2 \, a c d e - a b e^{2} + {\left (2 \, c^{2} d e - b c e^{2}\right )} x^{2} + {\left (2 \, b c d e - b^{2} e^{2}\right )} x\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + {\left (2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} d e - {\left (b^{3} - 4 \, a b c\right )} e^{2}\right )} x - {\left ({\left (b^{2} c - 4 \, a c^{2}\right )} e^{2} x^{2} + {\left (b^{3} - 4 \, a b c\right )} e^{2} x + {\left (a b^{2} - 4 \, a^{2} c\right )} e^{2}\right )} \log \left (c x^{2} + b x + a\right )}{a b^{2} c - 4 \, a^{2} c^{2} + {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} x^{2} + {\left (b^{3} c - 4 \, a b c^{2}\right )} x}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)^2/(c*x^2+b*x+a)^2,x, algorithm="fricas")

[Out]

[-((b^2*c - 4*a*c^2)*d^2 - (a*b^2 - 4*a^2*c)*e^2 + (2*a*c*d*e - a*b*e^2 + (2*c^2*d*e - b*c*e^2)*x^2 + (2*b*c*d
*e - b^2*e^2)*x)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^2 + 2*b*c*x + b^2 - 2*a*c + sqrt(b^2 - 4*a*c)*(2*c*x + b))/(c*
x^2 + b*x + a)) + (2*(b^2*c - 4*a*c^2)*d*e - (b^3 - 4*a*b*c)*e^2)*x - ((b^2*c - 4*a*c^2)*e^2*x^2 + (b^3 - 4*a*
b*c)*e^2*x + (a*b^2 - 4*a^2*c)*e^2)*log(c*x^2 + b*x + a))/(a*b^2*c - 4*a^2*c^2 + (b^2*c^2 - 4*a*c^3)*x^2 + (b^
3*c - 4*a*b*c^2)*x), -((b^2*c - 4*a*c^2)*d^2 - (a*b^2 - 4*a^2*c)*e^2 + 2*(2*a*c*d*e - a*b*e^2 + (2*c^2*d*e - b
*c*e^2)*x^2 + (2*b*c*d*e - b^2*e^2)*x)*sqrt(-b^2 + 4*a*c)*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)
) + (2*(b^2*c - 4*a*c^2)*d*e - (b^3 - 4*a*b*c)*e^2)*x - ((b^2*c - 4*a*c^2)*e^2*x^2 + (b^3 - 4*a*b*c)*e^2*x + (
a*b^2 - 4*a^2*c)*e^2)*log(c*x^2 + b*x + a))/(a*b^2*c - 4*a^2*c^2 + (b^2*c^2 - 4*a*c^3)*x^2 + (b^3*c - 4*a*b*c^
2)*x)]

________________________________________________________________________________________

giac [A]  time = 0.18, size = 114, normalized size = 1.31 \begin {gather*} \frac {e^{2} \log \left (c x^{2} + b x + a\right )}{c} + \frac {2 \, {\left (2 \, c d e - b e^{2}\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} c} - \frac {\frac {{\left (2 \, c d e - b e^{2}\right )} x}{c} + \frac {c d^{2} - a e^{2}}{c}}{c x^{2} + b x + a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)^2/(c*x^2+b*x+a)^2,x, algorithm="giac")

[Out]

e^2*log(c*x^2 + b*x + a)/c + 2*(2*c*d*e - b*e^2)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*c)
 - ((2*c*d*e - b*e^2)*x/c + (c*d^2 - a*e^2)/c)/(c*x^2 + b*x + a)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 141, normalized size = 1.62 \begin {gather*} -\frac {2 b \,e^{2} \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, c}+\frac {4 d e \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}+\frac {e^{2} \ln \left (c \,x^{2}+b x +a \right )}{c}+\frac {\frac {\left (b e -2 c d \right ) e x}{c}+\frac {a \,e^{2}-c \,d^{2}}{c}}{c \,x^{2}+b x +a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*c*x+b)*(e*x+d)^2/(c*x^2+b*x+a)^2,x)

[Out]

(e*(b*e-2*c*d)/c*x+(a*e^2-c*d^2)/c)/(c*x^2+b*x+a)+e^2*ln(c*x^2+b*x+a)/c+4*e/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)
/(4*a*c-b^2)^(1/2))*d-2/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b/c*e^2

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)^2/(c*x^2+b*x+a)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` f
or more details)Is 4*a*c-b^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 0.18, size = 248, normalized size = 2.85 \begin {gather*} \frac {a\,e^2}{c^2\,x^2+b\,c\,x+a\,c}-\frac {d^2}{c\,x^2+b\,x+a}+\frac {b\,e^2\,x}{c^2\,x^2+b\,c\,x+a\,c}-\frac {2\,d\,e\,x}{c\,x^2+b\,x+a}-\frac {b^2\,e^2\,\ln \left (c\,x^2+b\,x+a\right )}{4\,a\,c^2-b^2\,c}+\frac {4\,d\,e\,\mathrm {atan}\left (\frac {b}{\sqrt {4\,a\,c-b^2}}+\frac {2\,c\,x}{\sqrt {4\,a\,c-b^2}}\right )}{\sqrt {4\,a\,c-b^2}}-\frac {2\,b\,e^2\,\mathrm {atan}\left (\frac {b}{\sqrt {4\,a\,c-b^2}}+\frac {2\,c\,x}{\sqrt {4\,a\,c-b^2}}\right )}{c\,\sqrt {4\,a\,c-b^2}}+\frac {4\,a\,c\,e^2\,\ln \left (c\,x^2+b\,x+a\right )}{4\,a\,c^2-b^2\,c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((b + 2*c*x)*(d + e*x)^2)/(a + b*x + c*x^2)^2,x)

[Out]

(a*e^2)/(a*c + c^2*x^2 + b*c*x) - d^2/(a + b*x + c*x^2) + (b*e^2*x)/(a*c + c^2*x^2 + b*c*x) - (2*d*e*x)/(a + b
*x + c*x^2) - (b^2*e^2*log(a + b*x + c*x^2))/(4*a*c^2 - b^2*c) + (4*d*e*atan(b/(4*a*c - b^2)^(1/2) + (2*c*x)/(
4*a*c - b^2)^(1/2)))/(4*a*c - b^2)^(1/2) - (2*b*e^2*atan(b/(4*a*c - b^2)^(1/2) + (2*c*x)/(4*a*c - b^2)^(1/2)))
/(c*(4*a*c - b^2)^(1/2)) + (4*a*c*e^2*log(a + b*x + c*x^2))/(4*a*c^2 - b^2*c)

________________________________________________________________________________________

sympy [B]  time = 4.35, size = 340, normalized size = 3.91 \begin {gather*} \left (\frac {e^{2}}{c} - \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{c \left (4 a c - b^{2}\right )}\right ) \log {\left (x + \frac {- 4 a c \left (\frac {e^{2}}{c} - \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{c \left (4 a c - b^{2}\right )}\right ) + 4 a e^{2} + b^{2} \left (\frac {e^{2}}{c} - \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{c \left (4 a c - b^{2}\right )}\right ) - 2 b d e}{2 b e^{2} - 4 c d e} \right )} + \left (\frac {e^{2}}{c} + \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{c \left (4 a c - b^{2}\right )}\right ) \log {\left (x + \frac {- 4 a c \left (\frac {e^{2}}{c} + \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{c \left (4 a c - b^{2}\right )}\right ) + 4 a e^{2} + b^{2} \left (\frac {e^{2}}{c} + \frac {e \sqrt {- 4 a c + b^{2}} \left (b e - 2 c d\right )}{c \left (4 a c - b^{2}\right )}\right ) - 2 b d e}{2 b e^{2} - 4 c d e} \right )} + \frac {a e^{2} - c d^{2} + x \left (b e^{2} - 2 c d e\right )}{a c + b c x + c^{2} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)**2/(c*x**2+b*x+a)**2,x)

[Out]

(e**2/c - e*sqrt(-4*a*c + b**2)*(b*e - 2*c*d)/(c*(4*a*c - b**2)))*log(x + (-4*a*c*(e**2/c - e*sqrt(-4*a*c + b*
*2)*(b*e - 2*c*d)/(c*(4*a*c - b**2))) + 4*a*e**2 + b**2*(e**2/c - e*sqrt(-4*a*c + b**2)*(b*e - 2*c*d)/(c*(4*a*
c - b**2))) - 2*b*d*e)/(2*b*e**2 - 4*c*d*e)) + (e**2/c + e*sqrt(-4*a*c + b**2)*(b*e - 2*c*d)/(c*(4*a*c - b**2)
))*log(x + (-4*a*c*(e**2/c + e*sqrt(-4*a*c + b**2)*(b*e - 2*c*d)/(c*(4*a*c - b**2))) + 4*a*e**2 + b**2*(e**2/c
 + e*sqrt(-4*a*c + b**2)*(b*e - 2*c*d)/(c*(4*a*c - b**2))) - 2*b*d*e)/(2*b*e**2 - 4*c*d*e)) + (a*e**2 - c*d**2
 + x*(b*e**2 - 2*c*d*e))/(a*c + b*c*x + c**2*x**2)

________________________________________________________________________________________